package com.en.effectiveJava.chapter2.cancleReference6;

/**
 * 栈测试类
 * Create by EN
 * On 5/06/18 12:14 PM
*/
public class StackTest {

    public static void main(String[] args) {
        Stack stack = new Stack();
        for (int i = 0; i < 100; i++) {
            stack.push(Integer.valueOf(i));
        }
        for (int i = 0; i < 100; i++) {
            Object o = stack.pop();
            System.out.println(o);
        }
        Object[] elements = stack.getElements();
        Object element = elements[99];
        System.out.println(element);


    }

}
